package com.zyz.E_面向对象.F_Static;

/**
 * @author: vick
 * @Date: 2025/3/14
 * @Description:
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        Demo1 demo1 = new Demo1();
        demo1.name = "aaa";

        Demo1 demo2 = new Demo1();
        demo2.name = "bbb";
        //每一个对象的非静态属性，互不影响
        System.out.println(demo1.name);
        System.out.println(demo2.name);


        demo1.age = 18;
        System.out.println(demo1.age);
        demo2.age = 20;
        System.out.println(demo1.age); // 20
    }
}
